using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using RetailAnalytic.Core;
namespace RetailAnalytic.Shell
{
    public partial class FrmMainAdminUG : frmTemplate
    {
        
        public Int16 _iKey;
        public List<UserControl> listUserControl;
        
        public FrmMainAdminUG()
        {
            
            InitializeComponent();
            this.lvSel.Items[0].Appearance.Image = SR.ImagesLibrary.GetImageByName("roles");
            this.lvSel.Items[1].Appearance.Image = SR.ImagesLibrary.GetImageByName("user1");
            listUserControl = new List<UserControl>();
            listUserControl.Add(new UI.Administration.UcListGroup(0));
            listUserControl.Add(new UI.Administration.UcListGroup(1));

            SetCurrUC(0);
            ucStatusExecute1.SetStatus(false, "", "");
        }
      
        public void SetCurrUC(int iUC)
        {
            PanelContainer.Controls.Clear();
            UserControl currUC = listUserControl[iUC];
            try
            {
                ((UI.Administration.UcListGroup)currUC).RefreshUI(iUC);
            }
            catch 
            {
            }
            
            currUC.Dock = DockStyle.Fill;
            currUC.Parent = PanelContainer ;
            currUC.Show();
            //UserControl ucCurr = _listUserControl[iUC];
            //((IucMain)ucCurr).Name = "TEST Inteface";
           
           // ShowPresentationClass<PresentationAddhook>.SetList()[iUC].Parent = PanelContainer ;
            //ShowPresentationClass<PresentationAddhook>.SetList()[iUC].Show(); 
        }
        private void lvSel_ItemActivated(object sender, Infragistics.Win.UltraWinListView.ItemActivatedEventArgs e)
        {
            SetCurrUC(e.Item.Index);
        }

        private void ultraButton1_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void ultraButton2_Click(object sender, EventArgs e)
        {
        }

        private void FrmNP_FormClosing(object sender, FormClosingEventArgs e)
        {

        }
    }
}